<!DOCTYPE html>
<html >
	<head>
		<meta charset="utf-8" />
		<script type="text/javascript" src="../js/angular.js" ></script>
		<title></title>
	</head>
	<body ng-app="app" >
		<div ng-controller="ctrl" ng-init="name='张三'" >
			<input type="text" ng-trim="true" ng-model="name"  >
			{{name}}
			<button ng-click="show()" >run</button>
		</div>
		<script>
            var app=angular.module("app",[]);
            app.controller("ctrl",["$scope",function($scope){
                $scope.show=function () {
                    console.log($scope.name);
                }
            }]);

		</script>
	</body>
</html>
